package com.lichunsheng.stu.dao;

import com.lichunsheng.stu.entity.PeRole;

import java.util.Set;

import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/**
 * (PeRole)表数据库访问层
 *
 * @author makejava
 * @since 2021-01-02 16:48:47
 */
public interface PeRoleDao extends Mapper<PeRole> {

    @Select("SELECT\n" +
            "\t* \n" +
            "FROM\n" +
            "\tpe_role AS pr\n" +
            "\tINNER JOIN pe_user_role AS pur ON pur.role_id = pr.id \n" +
            "WHERE\n" +
            "\tpur.user_id = #{id} ")
    Set<PeRole> findByUserName(String id);
}